on Server
yum install nfs-utils rpcbind
mkdir /test1
mkdir /test2
systemctl enable rpcbind
systemctl enable nfs-server
systemctl enable nfs-lock
systemctl enable nfs-idmap
systemctl start rpcbind
systemctl start nfs-server
systemctl start nfs-lock
systemctl start nfs-idmap
systemctl status rpcbind
systemctl status nfs-server
systemctl status nfs-lock
systemctl status nfs-idmap
vi /etc/exports
/test1 192.168.0.*(rw,sync,no_root_squash,no_all_squash)
/test2 192.168.0.*(rw,sync,no_root_squash,no_all_squash)
systemctl restart nfs-server
firewall-cmd --permanent --zone=public --add-service=nfs
firewall-cmd --reload
firewall-cmd --list-all
on Client
yum install nfs-utils rpcbind
mkdir -p /mnt/test1
mkdir -p /mnt/test2
systemctl enable rpcbind
systemctl enable nfs-server
systemctl enable nfs-lock
systemctl enable nfs-idmap
systemctl start rpcbind
systemctl start nfs-server
systemctl start nfs-lock
systemctl start nfs-idmap
systemctl status rpcbind
systemctl status nfs-server
systemctl status nfs-lock
systemctl status nfs-idmap
mount -t nfs 192.168.0.10:/test1 /mnt/test1/
df -kh
vi /etc/fstab
192.168.0.10:/test1 /mnt/test1 nfs defaults 0 0
or
vi /etc/rc.d/rc.local
mount -t nfs 192.168.0.10:/test1 /mnt/test1/